package com.lanou3g.dllo.baidumusic.musiclibrary.radio;

import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

/**
 * Created by dllo on 16/6/25.
 */

public class RadioDetailActivityAdapter extends FragmentPagerAdapter {

    private String[] titles = {"活动", "主题", "天气", "心情", "语言", "年代", "曲风"};

    public RadioDetailActivityAdapter(FragmentManager fm) {
        super(fm);
    }

    @Override
    public Fragment getItem(int position) {
        RadioDetailFragment fragment = new RadioDetailFragment();
        Bundle bundle = new Bundle();
        bundle.putInt("id", position);
        fragment.setArguments(bundle);
        return fragment;
    }

    @Override
    public int getCount() {
        return titles.length;
    }

    @Override
    public CharSequence getPageTitle(int position) {
        return titles[position];
    }
}
